﻿@model IRIS.Models.ContentViewModel
@{
    ViewBag.Title = "Add";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    //We are going to trust the people who have access
    @Html.ValidationSummary(false)
    <fieldset>
        <legend>Skrifa nýja grein</legend>
            <div class="editor-label text">
                Titill
            </div>
            <div class="editor-field">
               @Html.TextBoxFor(m => m.m_Content.ContentTitle)
            </div>
            <div class="editor-label">
                Efni
            </div>
            <div class="editor-field">
               @Html.TextAreaFor(m => m.m_Content.ContentText)
            </div>
           <div class="editor-label">
                Flokkur
            </div>
            <div class="editor-field">
 
                @Html.DropDownListFor(n => n.m_Content.CID, new SelectList(Model.m_Categories,"ID", "Name"))
            </div>   
        <p>
            <input type="submit" value="Bæta við" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
